package com.amon.amonplayer.rxjava;

import com.amon.amonplayer.rxjava.function.Consumer;

public class LambdaObserver<T> implements Observer<T> {
    final Consumer<? super T> onNext;
    final Consumer<? super Throwable> onError;
    final Consumer<? super T> onComplete;

    public LambdaObserver(Consumer<? super T> onNext, Consumer<? super Throwable> onError, Consumer<? super T> onComplete) {
        this.onNext = onNext;
        this.onError = onError;
        this.onComplete = onComplete;
    }

    @Override
    public void onNext(T t) {
        onNext.accept(t);
    }

    @Override
    public void onError(Throwable e) {

    }

    @Override
    public void onComplete() {

    }

    @Override
    public void onSubscribe() {

    }
}
